<!DOCTYPE html>
<html>
<head>
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/easyui/locale/easyui-lang-zh_CN.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/gray/easyui.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
	<script type="text/javascript" src="__PUBLIC__/js/add-tab.js"></script>
	<script type="text/javascript"> 
		function formatTime(val,row) {     
   	 		return new Date(parseInt(val) * 1000).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ");
		}
		function formatUrl(val,row){
			if(val==null){
				return '无附件';
			}
			else{
				return '<a href="'+val+'" target="_blank">附件</a>';
			}
		}
		function formatContent(val,row){
			if(val==null){
				return '无内容';
			}
			else{
				return '<span style="cursor:pointer;color:red;" class="content">内容<span class="title" style="display:none;">'+val+'</span></span>'
			}
		}
		$(function(){

			$('.content').click(function(){
				var content =$(this).children('.title').html();
				$('.info_content').html(content);
				$('#dlg').dialog(
			        {
			            closed:false	            
			        }
			    );

			})

		})
	</script>
</head>
<body>
	<table id="tt" class="easyui-datagrid" title="公文记录" style="width:auto;height:auto"
			data-options="rownumbers:true,singleSelect:true,url:'__URL__/documentData',toolbar:'#tb'" rownumbers="true" pagination="true" fitColumns="true" fit="true" pageSize="20" pageList="[20,40,80]">
		<thead>
			<tr>
				<th field="process_begin_id" width="80" align="center">请假人</th>
				<th field="document_title" width="80" align="center">公文标题</th>
				<th field="document_des" width="80" align="center">备注</th>
				<th field="document_url" formatter="formatUrl" width="80" align="center">备注</th>
				<th field="document_content" formatter="formatContent" width="80" align="center">备注</th>
				<th field="process_time" formatter="formatTime" width="80" align="center">申请时间</th>			
			</tr>
		</thead>
	</table>
	<div id="dlg" class="easyui-dialog"  style="width:800px;height:450px;"  buttons="#dlg-buttons" closed='true' title="详情内容">
		<div class="contain">
		<p class="info_content"></p>
		</div>
    </div>
</body>
</html>